package org.demo.patten.strategy;

/**
 * @author zhuj
 * @date 2025/3/29
 * @apiNote
 */
public class Main {
    public static void main(String[] args) {
        PriceCalculator calculator = new PriceCalculator(new NoDiscountStrategy());
        System.out.println("原价：" + calculator.calculate(100));
        calculator.setStrategy(new MemberDiscountStrategy());
        System.out.println("会员价：" + calculator.calculate(100));
        calculator.setStrategy(new VipDiscountStrategy());
        System.out.println("VIP价：" + calculator.calculate(100));
    }
}
